3.10.40 \(\int \frac {(a+i a \tan (e+f x))^4}{(c-i c \tan (e+f x))^3} \, dx\) [940]

Optimal. Leaf size=114 \[ -\frac {a^4 x}{c^3}+\frac {i a^4 \log (\cos (e+f x))}{c^3 f}-\frac {8 i a^4}{3 f (c-i c \tan (e+f x))^3}+\frac {6 i a^4}{c f (c-i c \tan (e+f x))^2}-\frac {6 i a^4}{f \left (c^3-i c^3 \tan (e+f x)\right )} \]

[Out]

-a^4*x/c^3+I*a^4*ln(cos(f*x+e))/c^3/f-8/3*I*a^4/f/(c-I*c*tan(f*x+e))^3+6*I*a^4/c/f/(c-I*c*tan(f*x+e))^2-6*I*a^
4/f/(c^3-I*c^3*tan(f*x+e))

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 114, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3603, 3568, 45} \begin {gather*} -\frac {6 i a^4}{f \left (c^3-i c^3 \tan (e+f x)\right )}+\frac {i a^4 \log (\cos (e+f x))}{c^3 f}-\frac {a^4 x}{c^3}+\frac {6 i a^4}{c f (c-i c \tan (e+f x))^2}-\frac {8 i a^4}{3 f (c-i c \tan (e+f x))^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[e + f*x])^4/(c - I*c*Tan[e + f*x])^3,x]

[Out]

-((a^4*x)/c^3) + (I*a^4*Log[Cos[e + f*x]])/(c^3*f) - (((8*I)/3)*a^4)/(f*(c - I*c*Tan[e + f*x])^3) + ((6*I)*a^4
)/(c*f*(c - I*c*Tan[e + f*x])^2) - ((6*I)*a^4)/(f*(c^3 - I*c^3*Tan[e + f*x]))

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 3568

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rule 3603

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Di
st[a^m*c^m, Int[Sec[e + f*x]^(2*m)*(c + d*Tan[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] &&
EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0] && IntegerQ[m] &&  !(IGtQ[n, 0] && (LtQ[m, 0] || GtQ[m, n]))

Rubi steps

\begin {align*} \int \frac {(a+i a \tan (e+f x))^4}{(c-i c \tan (e+f x))^3} \, dx &=\left (a^4 c^4\right ) \int \frac {\sec ^8(e+f x)}{(c-i c \tan (e+f x))^7} \, dx\\ &=\frac {\left (i a^4\right ) \text {Subst}\left (\int \frac {(c-x)^3}{(c+x)^4} \, dx,x,-i c \tan (e+f x)\right )}{c^3 f}\\ &=\frac {\left (i a^4\right ) \text {Subst}\left (\int \left (\frac {1}{-c-x}+\frac {8 c^3}{(c+x)^4}-\frac {12 c^2}{(c+x)^3}+\frac {6 c}{(c+x)^2}\right ) \, dx,x,-i c \tan (e+f x)\right )}{c^3 f}\\ &=-\frac {a^4 x}{c^3}+\frac {i a^4 \log (\cos (e+f x))}{c^3 f}-\frac {8 i a^4}{3 f (c-i c \tan (e+f x))^3}+\frac {6 i a^4}{c f (c-i c \tan (e+f x))^2}-\frac {6 i a^4}{f \left (c^3-i c^3 \tan (e+f x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.17, size = 143, normalized size = 1.25 \begin {gather*} \frac {a^4 \left (-3 i \cos (e+f x)+\cos (3 (e+f x)) \left (-2 i-6 f x+3 i \log \left (\cos ^2(e+f x)\right )\right )-9 \sin (e+f x)+2 \sin (3 (e+f x))+6 i f x \sin (3 (e+f x))+3 \log \left (\cos ^2(e+f x)\right ) \sin (3 (e+f x))\right ) (\cos (3 e+7 f x)+i \sin (3 e+7 f x))}{6 c^3 f (\cos (f x)+i \sin (f x))^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[e + f*x])^4/(c - I*c*Tan[e + f*x])^3,x]

[Out]

(a^4*((-3*I)*Cos[e + f*x] + Cos[3*(e + f*x)]*(-2*I - 6*f*x + (3*I)*Log[Cos[e + f*x]^2]) - 9*Sin[e + f*x] + 2*S
in[3*(e + f*x)] + (6*I)*f*x*Sin[3*(e + f*x)] + 3*Log[Cos[e + f*x]^2]*Sin[3*(e + f*x)])*(Cos[3*e + 7*f*x] + I*S
in[3*e + 7*f*x]))/(6*c^3*f*(Cos[f*x] + I*Sin[f*x])^4)

________________________________________________________________________________________

Maple [A]
time = 0.22, size = 65, normalized size = 0.57

method result size
derivativedivides \(\frac {a^{4} \left (-\frac {6 i}{\left (\tan \left (f x +e \right )+i\right )^{2}}+\frac {6}{\tan \left (f x +e \right )+i}-i \ln \left (\tan \left (f x +e \right )+i\right )-\frac {8}{3 \left (\tan \left (f x +e \right )+i\right )^{3}}\right )}{f \,c^{3}}\) \(65\)
default \(\frac {a^{4} \left (-\frac {6 i}{\left (\tan \left (f x +e \right )+i\right )^{2}}+\frac {6}{\tan \left (f x +e \right )+i}-i \ln \left (\tan \left (f x +e \right )+i\right )-\frac {8}{3 \left (\tan \left (f x +e \right )+i\right )^{3}}\right )}{f \,c^{3}}\) \(65\)
risch \(-\frac {i a^{4} {\mathrm e}^{6 i \left (f x +e \right )}}{3 c^{3} f}+\frac {i a^{4} {\mathrm e}^{4 i \left (f x +e \right )}}{2 c^{3} f}-\frac {i a^{4} {\mathrm e}^{2 i \left (f x +e \right )}}{c^{3} f}+\frac {2 a^{4} e}{c^{3} f}+\frac {i a^{4} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{c^{3} f}\) \(101\)
norman \(\frac {-\frac {4 i a^{4} \left (\tan ^{2}\left (f x +e \right )\right )}{c f}-\frac {a^{4} x}{c}-\frac {8 i a^{4}}{3 c f}-\frac {3 a^{4} x \left (\tan ^{2}\left (f x +e \right )\right )}{c}-\frac {3 a^{4} x \left (\tan ^{4}\left (f x +e \right )\right )}{c}-\frac {a^{4} x \left (\tan ^{6}\left (f x +e \right )\right )}{c}+\frac {2 a^{4} \tan \left (f x +e \right )}{c f}-\frac {8 a^{4} \left (\tan ^{3}\left (f x +e \right )\right )}{3 c f}+\frac {6 a^{4} \left (\tan ^{5}\left (f x +e \right )\right )}{c f}-\frac {12 i a^{4} \left (\tan ^{4}\left (f x +e \right )\right )}{c f}}{c^{2} \left (1+\tan ^{2}\left (f x +e \right )\right )^{3}}-\frac {i a^{4} \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2 c^{3} f}\) \(209\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(f*x+e))^4/(c-I*c*tan(f*x+e))^3,x,method=_RETURNVERBOSE)

[Out]

1/f*a^4/c^3*(-6*I/(tan(f*x+e)+I)^2+6/(tan(f*x+e)+I)-I*ln(tan(f*x+e)+I)-8/3/(tan(f*x+e)+I)^3)

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^4/(c-I*c*tan(f*x+e))^3,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: expt: undefined: 0 to a negative e
xponent.

________________________________________________________________________________________

Fricas [A]
time = 1.28, size = 72, normalized size = 0.63 \begin {gather*} \frac {-2 i \, a^{4} e^{\left (6 i \, f x + 6 i \, e\right )} + 3 i \, a^{4} e^{\left (4 i \, f x + 4 i \, e\right )} - 6 i \, a^{4} e^{\left (2 i \, f x + 2 i \, e\right )} + 6 i \, a^{4} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{6 \, c^{3} f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^4/(c-I*c*tan(f*x+e))^3,x, algorithm="fricas")

[Out]

1/6*(-2*I*a^4*e^(6*I*f*x + 6*I*e) + 3*I*a^4*e^(4*I*f*x + 4*I*e) - 6*I*a^4*e^(2*I*f*x + 2*I*e) + 6*I*a^4*log(e^
(2*I*f*x + 2*I*e) + 1))/(c^3*f)

________________________________________________________________________________________

Sympy [A]
time = 0.34, size = 168, normalized size = 1.47 \begin {gather*} \frac {i a^{4} \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{c^{3} f} + \begin {cases} \frac {- 2 i a^{4} c^{6} f^{2} e^{6 i e} e^{6 i f x} + 3 i a^{4} c^{6} f^{2} e^{4 i e} e^{4 i f x} - 6 i a^{4} c^{6} f^{2} e^{2 i e} e^{2 i f x}}{6 c^{9} f^{3}} & \text {for}\: c^{9} f^{3} \neq 0 \\\frac {x \left (2 a^{4} e^{6 i e} - 2 a^{4} e^{4 i e} + 2 a^{4} e^{2 i e}\right )}{c^{3}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))**4/(c-I*c*tan(f*x+e))**3,x)

[Out]

I*a**4*log(exp(2*I*f*x) + exp(-2*I*e))/(c**3*f) + Piecewise(((-2*I*a**4*c**6*f**2*exp(6*I*e)*exp(6*I*f*x) + 3*
I*a**4*c**6*f**2*exp(4*I*e)*exp(4*I*f*x) - 6*I*a**4*c**6*f**2*exp(2*I*e)*exp(2*I*f*x))/(6*c**9*f**3), Ne(c**9*
f**3, 0)), (x*(2*a**4*exp(6*I*e) - 2*a**4*exp(4*I*e) + 2*a**4*exp(2*I*e))/c**3, True))

________________________________________________________________________________________

Giac [A]
time = 0.85, size = 193, normalized size = 1.69 \begin {gather*} -\frac {-\frac {30 i \, a^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{c^{3}} + \frac {60 i \, a^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}{c^{3}} - \frac {30 i \, a^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{c^{3}} + \frac {-147 i \, a^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 1002 \, a^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 2445 i \, a^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 3820 \, a^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 2445 i \, a^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1002 \, a^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 147 i \, a^{4}}{c^{3} {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{6}}}{30 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^4/(c-I*c*tan(f*x+e))^3,x, algorithm="giac")

[Out]

-1/30*(-30*I*a^4*log(tan(1/2*f*x + 1/2*e) + 1)/c^3 + 60*I*a^4*log(tan(1/2*f*x + 1/2*e) + I)/c^3 - 30*I*a^4*log
(tan(1/2*f*x + 1/2*e) - 1)/c^3 + (-147*I*a^4*tan(1/2*f*x + 1/2*e)^6 + 1002*a^4*tan(1/2*f*x + 1/2*e)^5 + 2445*I
*a^4*tan(1/2*f*x + 1/2*e)^4 - 3820*a^4*tan(1/2*f*x + 1/2*e)^3 - 2445*I*a^4*tan(1/2*f*x + 1/2*e)^2 + 1002*a^4*t
an(1/2*f*x + 1/2*e) + 147*I*a^4)/(c^3*(tan(1/2*f*x + 1/2*e) + I)^6))/f

________________________________________________________________________________________

Mupad [B]
time = 4.73, size = 102, normalized size = 0.89 \begin {gather*} -\frac {\frac {6\,a^4\,{\mathrm {tan}\left (e+f\,x\right )}^2}{c^3}-\frac {8\,a^4}{3\,c^3}+\frac {a^4\,\mathrm {tan}\left (e+f\,x\right )\,6{}\mathrm {i}}{c^3}}{f\,\left (-{\mathrm {tan}\left (e+f\,x\right )}^3-{\mathrm {tan}\left (e+f\,x\right )}^2\,3{}\mathrm {i}+3\,\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )}-\frac {a^4\,\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,1{}\mathrm {i}}{c^3\,f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*tan(e + f*x)*1i)^4/(c - c*tan(e + f*x)*1i)^3,x)

[Out]

- ((a^4*tan(e + f*x)*6i)/c^3 - (8*a^4)/(3*c^3) + (6*a^4*tan(e + f*x)^2)/c^3)/(f*(3*tan(e + f*x) - tan(e + f*x)
^2*3i - tan(e + f*x)^3 + 1i)) - (a^4*log(tan(e + f*x) + 1i)*1i)/(c^3*f)

________________________________________________________________________________________